package com.qianniu.napi.admin.entity;

import com.baomidou.mybatisplus.enums.IdType;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.qianniu.napi.admin.web.goods.entity.GoodsInternetProduct;
import com.qianniu.napi.admin.web.goods.entity.GoodsPackageContent;
import com.qianniu.napi.admin.web.goods.entity.GoodsPurchasingInstructions;
import com.qianniu.napi.common.util.DateUtil;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 实体店商家地址，需要满足实体营业执照+店面+独立小程序
 * </p>
 *
 * @author chenxuebin
 * @since 2018-10-16
 */
@TableName("t_store")
@Data
public class Store extends Model<Store> {

    private static final long serialVersionUID = 1L;

	@TableId(value="id", type= IdType.AUTO)
	private Long id;
    /**
     * 名称&
     */
	private String name;
	private String jianchen;

    /**
     * 纬度坐标&
     */
	private Double latitude;
    /**
     * 经度坐标&
     */
	private Double longitude;
    /**
     * 排序&
     */
	private Integer paixu;
    /**
     * 地址&
     */
	private String address;
    /**
     * 商家特色&
     */
	private String characteristic;
    /**
     * 省代码&
     */
	@TableField("province_code")
	private String provinceCode;
    /**
     * 省&
     */
	private String province;
    /**
     * 市代码&
     */
	@TableField("city_code")
	private String cityCode;

    /**
     * 市&&
     */
	private String city;
    /**
     * 区代码&
     */
	@TableField("district_code")
	private String districtCode;

    /**
     * 区&
     */
	private String district;
    /**
     * 店铺介绍&
     */
	private String video;
	private String info;
	private String xiangqing;

	private String zhizhao;
	private String xukezheng;
	private String zhengshu;

    /**
     * 联系人
     */
	private String linkman;
    /**
     * 联系电话&
     */
	private String phone;
	private String phone2;

    /**
     * 店铺图片&
     */
	private String thumb;
	private String pic;

	private String logo;

    /**
     * 商家类目&
     */
	private String type;

	@TableField(exist = false)
	private Integer shoucang;

	@TableField(exist = false)
	private String typeName;

	@TableField(exist = false)
	private User gluser;

	@TableField(exist = false)
	private List<News> news;

	@TableField(exist = false)
	private List<Goods> huodong;

    /**
     * 启用状态
     */
	private Integer state;
	private Date starttime;
	private Date endtime;

	@TableField(exist = false)
	private String starttimeStr;
	@TableField(exist = false)
	private String endtimeStr;

	@JsonIgnore
	private Long uid;
    /**
     * 商家ID&
     */
	@JsonIgnore
	private Long mid;

	@JsonIgnore
	private Long mpid;
    /**
     * 营业时间
     */
	@TableField("open_hour")
	private String openHour;
    /**
     * 微信号
     */
	private String wxno;

	private String photos;
    /**
     * 支持WIFI
     */
	@TableField("is_wifi")
	private Integer isWifi;
    /**
     * 支持微信支付
     */
	@TableField("is_wxpay")
	private Integer isWxpay;
    /**
     * 支持支付宝支付
     */
	@TableField("is_zfbpay")
	private Integer isZfbpay;
    /**
     * 支持停车位
     */
	@TableField("is_parking")
	private Integer isParking;

    /**
     * 是否实体
     */
	@TableField("is_shiti")
	private Integer isShiti;

    /**
     * 是否连锁
     */
	@TableField("is_liansuo")
	private Integer isLiansuo;

	private Integer mlevel;

	private Integer showforpay;

    /**
     * 是否外卖
     */
	@TableField("is_waimai")
	private Integer isWaimai;

	@TableField("is_tihuo")
	private Integer isTihuo;

	@TableField("is_yikatong")
	private Integer isYikatong;

	@TableField("is_dulizs")
	private Integer isDulizs;

	@TableField("is_cbct")
	private Integer isCbct;

	@TableField("is_auth")
	private Integer isAuth;
	private String authno;
	private String yzno;
	private Integer yzstatus;
	private String gxbno;

	private BigDecimal zhekou;

	private String vrurl;

	private String wifiname;
	private String wifipwd;

	private Integer status;
	private String shinfo;

	private Integer zhexiao;
	private Integer jrhexiao;
	private Integer xdhexiao;

	private Integer sellnum;
	private Integer songda;
	private Integer pingfen;
	private Integer views;
	private Integer renqi;
	private Integer mchtype;

	@TableField(exist = false)
	private double distance;

	@TableField(exist = false)
	private List<Goods> goods;
	@TableField(exist = false)
	private List<CouponTpl> couponTpls;

	private BigDecimal price;
	private BigDecimal pjprice;

	private BigDecimal qisongfee;
	private BigDecimal peisongfee;
	private BigDecimal jffanbi;
	private Long leagueid;
	private Integer pstype;
	private Integer isprint;

	private String zhutui;
	@JsonIgnore
	private String unionid;
	private String skus;
	private String xuzhi;
	private String youhui;
	//优惠券ID
	private Long youhuiid;
	private String typename;

	@JsonIgnore
	private Date createtime;
	@JsonIgnore
	private Date modifytime;
	@JsonIgnore
	private Long modifier;

	private String gzhimg;
	private String kefuimg;
	private String payimg;


	@TableField(exist = false)
	private Goods good;

	@TableField(exist = false)
	private List<GoodsInternetProduct> goodsInternetProductList;

	@TableField(exist = false)
	private List<GoodsPackageContent> goodsPackageContentList;

	@TableField(exist = false)
	private List<GoodsPurchasingInstructions> goodsPurchasingInstructionsList;

	@Override
	protected Serializable pkVal() {
		return this.id;
	}


	@Override
	public String toString() {
		return "Store{" +
			"id=" + id +
			", name=" + name +
			", latitude=" + latitude +
			", longitude=" + longitude +
			", paixu=" + paixu +
			", address=" + address +
			", characteristic=" + characteristic +
			", province=" + province +
			", city=" + city +
			", district=" + district +
			", info=" + info +
			", linkman=" + linkman +
			", phone=" + phone +
			", pic=" + pic +
			", type=" + type +
			", state=" + state +
			", uid=" + uid +
			", mid=" + mid +
			", mpid=" + mpid +
			", openHour=" + openHour +
			", wxno=" + wxno +
			", isWifi=" + isWifi +
			", isWxpay=" + isWxpay +
			", isZfbpay=" + isZfbpay +
			", isParking=" + isParking +
			", createtime=" + createtime +
			", modifytime=" + modifytime +
			", modifier=" + modifier +
			"}";
	}
}
